package com.ruoyi.modularbusiness.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.modularbusiness.mapper.FormtypeSecondaryMapper;
import com.ruoyi.modularbusiness.domain.FormtypeSecondary;
import com.ruoyi.modularbusiness.service.IFormtypeSecondaryService;

/**
 * 单类型Service业务层处理
 * 
 * @author liuzhen
 * @date 2023-04-12
 */
@Service
public class FormtypeSecondaryServiceImpl implements IFormtypeSecondaryService 
{
    @Autowired
    private FormtypeSecondaryMapper formtypeSecondaryMapper;

    /**
     * 查询单类型
     * 
     * @param ftid 单类型主键
     * @return 单类型
     */
    @Override
    public FormtypeSecondary selectFormtypeSecondaryByFtid(Long ftid)
    {
        return formtypeSecondaryMapper.selectFormtypeSecondaryByFtid(ftid);
    }

    /**
     * 查询单类型列表
     * 
     * @param formtypeSecondary 单类型
     * @return 单类型
     */
    @Override
    public List<FormtypeSecondary> selectFormtypeSecondaryList(FormtypeSecondary formtypeSecondary)
    {
        return formtypeSecondaryMapper.selectFormtypeSecondaryList(formtypeSecondary);
    }

    /**
     * 新增单类型
     * 
     * @param formtypeSecondary 单类型
     * @return 结果
     */
    @Override
    public int insertFormtypeSecondary(FormtypeSecondary formtypeSecondary)
    {
        formtypeSecondary.setCreateTime(DateUtils.getNowDate());
        return formtypeSecondaryMapper.insertFormtypeSecondary(formtypeSecondary);
    }

    /**
     * 修改单类型
     * 
     * @param formtypeSecondary 单类型
     * @return 结果
     */
    @Override
    public int updateFormtypeSecondary(FormtypeSecondary formtypeSecondary)
    {
        formtypeSecondary.setUpdateTime(DateUtils.getNowDate());
        return formtypeSecondaryMapper.updateFormtypeSecondary(formtypeSecondary);
    }

    /**
     * 批量删除单类型
     * 
     * @param ftids 需要删除的单类型主键
     * @return 结果
     */
    @Override
    public int deleteFormtypeSecondaryByFtids(Long[] ftids)
    {
        return formtypeSecondaryMapper.deleteFormtypeSecondaryByFtids(ftids);
    }

    /**
     * 删除单类型信息
     * 
     * @param ftid 单类型主键
     * @return 结果
     */
    @Override
    public int deleteFormtypeSecondaryByFtid(Long ftid)
    {
        return formtypeSecondaryMapper.deleteFormtypeSecondaryByFtid(ftid);
    }
}
